package site.zhangzhuo.learn_springboot.profileConditional;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

@Configuration
@Profile("weekday")
public class WeekdayLibraryConfiguration {
    @Bean
    public LibraryOpeningHours weekdayOpeningHours() {
        return new LibraryOpeningHours("8:00 AM", "6:00 PM");
    }

    @Bean
    public Library2 library(LibraryOpeningHours openingHours) {
        return new Library2(openingHours);
    }
}
